﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using StudentManage.Data;

namespace StudentManage.Web.NewsPage
{
    public partial class NewsInfo : SecurityPage
    {
        #region 属性

        #endregion

        #region 继承

        #endregion

        #region 函数
        private void LoadData()
        {
            int NewsId = Convert.ToInt32(Request.QueryString["id"]);
            StudentManage.Data.News md = StudentManage.Data.News.Where("id=@0", NewsId).First();
            this.lab_title.Text = md.Title;
            this.lab_Source.Text = md.Source;
            this.lab_Author.Text = md.Author;
            this.lab_Addtime.Text = md.AddTime.ToString();
            this.lab_content.Text = md.Contents;
        }
        #endregion

        #region 事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) return;
            LoadData();
        }
        #endregion
    }
}